import requests

resp = requests.put(url="http://ihrm2-test.itheima.net/api/company/department/1570785846452416512",
                     headers={"Authorization": "5dc35dad-208e-478d-873a-927ed58b6300"},
                     json={"name": "测试部", "code": "00003"})
print(resp.json())